package com.mxpio.erp.common.technology.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_TECHNOLOGY_WROKTEAM_MEMBER")
@Schema(description="班组成员")
public class WorkTeamMember extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	private String id;

	@Column(name = "WORK_TEAM_CODE_", updatable = false)
	@Schema(description = "班组编号")
	private String workTeamCode;

	@Schema(description = "班组名称")
	@Column(name = "WORK_TEAM_NAME_" )
	private String workTeamName;

	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
	@Column(name = "MEMBER_ID_")
	@Schema(description = "员工工号")
	private String memberId;

	@Schema(description = "员工名字")
	@Column(name = "MEMBER_NAME_")
	private String memberName;
}
